<script type="text/javascript">
function openDetailMessagePP(value){				       
					        ${remoteFunction(
								controller:'message',
								type:'POST',
								action:'messageDetail',
								params: '\'id=\'+value',
								update: [success: 'mesviewpp'],
								onComplete:'$("#detail_message").modal()'					
							)}		
					    }
</script>

<g:if test="${events }">

	<g:each in="${events }" var="evento">
		
		<li>
			<span class="padding-10 unread">
			<em class="badge padding-5 no-border-radius bg-color-purple txt-color-white pull-left margin-right-5">
			<i class="fa fa-calendar fa-fw fa-2x"></i>
			</em>
			<span>
			<a href="#" onClick="openDetailMessagePP(${evento.id})" class="display-normal"><strong>Evento</strong></a>: ${evento.eventTitle } 
			<br>
			<g:formatDate format="dd-MM-yyyy" date="${evento.expire}" type="datetime" style="LONG" timeStyle="SHORT"/><br>
			<g:if test="${evento?.message}">
				<span class="pull-right font-xs text-muted"><i>
					<exdutility:truncateText stringIn="${evento.message}" max-size="20"/>
				</i></span>
			</g:if>
			</span>
			</span>
		</li>
	
	
	</g:each>



</g:if>
<g:else>
<li class="text-center text-muted">
Non sono presenti eventi inseriti
</li>
</g:else>